<!DOCTYPE html>
<html lang="ar">
<head>
    <title>قائمة المهمات</title>
	<?php
	 define('LAST_CAPITRE_ID',19);
	 define('LAST_ARTICLE_CODE',3);
	?>
	
	<?php $this->load->helper('url');?>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta charset="utf-8">
		<!---------------------for autocomplete--------------->
	<script type="text/javascript" src="<?php echo base_url('assets/js/jquery-1.11.0.min.js');?>" ></script>
	<script type="text/javascript" src="<?php echo base_url('assets/js/jquery-ui-1.10.4/js/jquery-ui-1.10.4.min.js');?>" ></script>
	<link href="<?php echo base_url("assets/css/jquery-ui.css")?>" rel="stylesheet" type="text/css" />
	<!------------------------------------------------------>


<script type="text/javascript" src="<?php echo base_url('assets/js/jquery.tablesorter.min.js');?>" ></script>
		<link href="<?php echo base_url("assets/css/table.css")?>" rel="stylesheet" type="text/css" />
	<link href="<?php echo base_url("assets/css/ch_menu.css")?>" rel="stylesheet" type="text/css" />
	 <link href="<?php echo base_url("assets/css/botton.css")?>" rel="stylesheet" type="text/css" />

</head>

<body>
<?php include_once('header.php');
	
	echo('<br><br>');	
	
 ?>

<div class="container">




</div>

<div id="destination" >
  <h1><?php echo $titre;   ?></h1>
  <div id="body">
  
  
    <div class="CSS_Table_Example" >
   <table id="myTable" class="tablesorter">
  <thead>
<tr>

  <th>   المبلغ   </th> 
 <th>    الالتزام   </th>

   <th> الاسم  </th>
 <th>  المهمة</th>
</tr>
</thead>
<?php
$rmq=0; // var utilise pour savoire que ce fournisseur a besoin de convention de regularisation
foreach($results as $data) 
{

	echo '<tr >
	
	  <td>'.$data->montant.'</td>
	 <td>'.$data->id_engagement_fk.'</td>	 
	
	   <td>'.$data->nom.'</td>	 
<td> <a href='.base_url("/mission_ctr/detaille_mission/$data->id_mission").'>'.$data->numero.'</a></td>
    
	  
	  
		  </tr>'  ;
	
}
   $goupe=$this->session->userdata('user_group'); //access it
 // $msg=0; // msg la ne fait rien mais elle indispensable pour appeller ajout_bc et ajout un boton
?>
</table>
</div>
<div class="pagination_numero">
  <p><?php echo $links;   ?></p>
 </div>
 <div>  
<form  style="position: relative; left: 10%;">
<a href="<?php echo base_url("/budget_ctr/load/")?>" class="botton">خروج</a>
<?php
if($goupe=="admin"){
	$msg=0;
echo ('<a href="'. base_url('/mission_ctr/ajout/').'/'.$msg.'" class="botton">اضافة</a>');
}

?>
</form> 
</div>
  </div>
 
</div>
</body>
  <script>
 $(document).ready(function() 
    { 
        $("#myTable").tablesorter(); 
    } 
); 
 </script>   
 <script>
$(function() {
	var liste_fourniss = <?php echo json_encode($liste_des_fournisseurs); ?>;
	$( "#nom" ).autocomplete({source: liste_fourniss});
	} 
); 
</script>
</html>